package cn.zaichi.edu.excelcommon.constants;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

import cn.zaichi.edu.excelcommon.process.ProcessEntity;

/**
 * 任务详情
 */
public class ProcessContext {

    private static ConcurrentMap<String,ProcessEntity> proessMap=new ConcurrentHashMap<>();

    public static void put(String uuid,ProcessEntity entity){
        proessMap.put(uuid,entity);

    }
    public static ProcessEntity get(String uuid){

        ProcessEntity pe=proessMap.get(uuid);
        if(pe==null){
            pe=new ProcessEntity(-1, -1,-1, "", "", 0, 0);
            proessMap.put(uuid,pe);
        }
        return pe;
    }
}
